package com.jy.appmarket.utils;

import android.app.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

public class WidgetProviderTools {
	
	public final static String KEY = "isFirstStart";

	public static boolean isFirstStart(Context ctx, String name, String key) {
		SharedPreferences sp = ctx.getSharedPreferences(name,
				Activity.MODE_PRIVATE);
		return sp.getBoolean(key, false);
	}

	public static void saveFirstStartedState(Context ctx, String name,
			String key) {
		SharedPreferences sp = ctx.getSharedPreferences(name,
				Activity.MODE_PRIVATE);
		Editor edit = sp.edit();
		edit.putBoolean(key, true);
		edit.commit();
	}

}
